Refresh meos-idl.json to MEOS-API canonical; regenerate bindings#2
Conversation
|
Thank you for the refresh. I ran a final reproducibility check after MobilityDB/MEOS-API#15 landed, and the committed IDL doesn't match what regenerates from the current canonical state. Could you regenerate against master once more before we merge? Pulled MEOS-API master (now with #15 merged), ran
3 causes:1. Older
|
| Function (slot) | This PR's IDL | Fresh from master |
|---|---|---|
edwithin_tcbuffer_geo (gs param) |
const int * |
const GSERIALIZED * |
geom_perimeter (gs param) |
const int * |
const GSERIALIZED * |
temporal_start_value (return) |
int |
Datum |
tsequence_max_val (return) |
int |
Datum |
overbefore_set_date (d param) |
int |
DateADT |
512 functions are affected: every GSERIALIZED * / Datum / DateADT / GBOX * / BOX3D * slot in scope is still spelled int/int * here.
2. MobilityDB headers were not master
The IDL contains 160 functions that don't exist in MobilityDB master:
- 60
tbigint_* - 63
th3index_* - 121
tcbuffer_*(vs ~70 on master) - 54
tpose_*
These look like a feature branch with the extended type families. Could you confirm which MobilityDB commit/branch was used? If it's a not-yet-merged feature branch, the binding generator's source of truth would point at code that doesn't exist upstream, I'd prefer the canonical MEOS.js to track a state of MobilityDB that's already public.
3. Two functions present on master but missing here
mindistance_tgeo_tgeo and tgeoarr_tgeoarr_mindist — confirms the headers snapshot used was slightly behind current master.
What I'm asking for
- Rebase on current
main(now with Initial commit #1 merged) and regeneratecodegen/res/meos-idl.jsonviapython run.pyagainst:- MEOS-API at current master (after the #15 merge)
- MobilityDB headers at a stable state: either master, or a specific feature branch you can document in the PR body
- Re-run
npm run generateagainst the new IDL, commit the updatedbindings.c+functions.generated.ts - Force-push the amended
23722ba
The reproducibility check I ran is:
# in a fresh MEOS-API checkout, master at or after the #15 merge
python setup.py # or --branch <feature> if you used a branch
python run.py
diff <(jq -S . output/meos-idl.json) \
<(jq -S . path/to/MEOS.js/codegen/res/meos-idl.json)Once that diff is empty, I'll re-verify and approve.
23722ba to
bbf7831
Compare
|
Done — rebased onto Point by point:
One thing your I also bumped the
|
Regenerate codegen/res/meos-idl.json from MEOS-API master (including #15's
typerecover fix) against MobilityDB master (2c4243a). This recovers the
PG-vendored C types the libclang parse had collapsed to int — GSERIALIZED,
Datum, DateADT, GBOX, BOX3D, AFFINE — fixing ~512 signature drifts, and picks
up mindistance_tgeo_tgeo / tgeoarr_tgeoarr_mindist. The IDL now tracks the
public MobilityDB surface (2672 functions); the not-yet-merged extended-type
families are dropped until they land on master.
Generate the binding for the PUBLIC MEOS API only. The generator now excludes:
- internal headers (meos_internal.h / meos_internal_geo.h) — not user-facing,
unused by core/types, and many carry the opaque Datum;
- the bundled liblwgeom glue header (postgis_ext_defs.in.h) — PostGIS internals;
- any Datum-signature function — a Datum is an opaque tagged uintptr_t (a
pointer for Float8/text/geometry, 32-bit under WASM32) that cannot be
marshalled to a JS scalar; the user-facing path is the typed *_meos.c wrapper
(e.g. temporal_start_value -> tint/tfloat/ttext_start_value).
No Datum appears in any functions.generated.ts signature. The C preamble now
includes the public extended-type headers (meos_cbuffer/npoint/pose/rgeo.h) so
the cbuffer/npoint/pose/trgeometry wrappers compile.
Track MobilityDB's mult -> mul multiplication rename in the TFloat/TInt/TNumber
wrappers. Update the Dockerfile WASM build: bump the MOBILITYDB_COMMIT pin to
2c4243a, enable the CBUFFER/NPOINT/POSE/RGEO MEOS modules, and add the json-c
and gsl include paths so the regenerated extended-type bindings compile and link.
npm run generate -> Generated: 2124 Skipped: 1 Manual: 35
npx tsc --noEmit -> clean
reproducibility: diff of a fresh run.py output vs the committed IDL is empty
bbf7831 to
395ffa5
Compare
|
Pushed a refinement to The generated binding now mirrors the PUBLIC MEOS API only. The generator excludes, in addition to
The C preamble now also On the WASM build: I verified |
Re-verified after the rebase and the v3 force-push (
|
Refreshes
codegen/res/meos-idl.jsonto the MEOS-API canonical IDL and regenerates both outputs, now tracking the public MobilityDB surface.Source of truth (reproducible)
2c4243aThe committed IDL is exactly what
python setup.py && python run.pyproduces against those two states:What changed vs the previous IDL
typerecover.pyrecoversGSERIALIZED/Datum/DateADT/GBOX/BOX3D/AFFINEslots that the earlier parse had collapsed toint/int *.mindistance_tgeo_tgeoandtgeoarr_tgeoarr_mindistare present.Datum stays out of the user API
The recovered types exposed that 171 functions carry a
Datumin their signature — all internal (meos_internal.h). ADatumis an opaque taggeduintptr_t(a pointer forFloat8/text/ geometry base types, 32-bit under WASM32) and cannot be marshalled to a JS scalar. The generator now skips everyDatum-signature function (isDatumadded toshouldSkip); the user-facing path is the typed*_meos.cwrappers, e.g.temporal_start_value→tint_start_value/tfloat_start_value/ttext_start_value. NoDatumappears in anyfunctions.generated.tssignature.Wrapper + build sync
core/types/basic/{TFloat,TInt,TNumber}.ts: track MobilityDB'smult_*→mul_*multiplication rename (the onlycore/typeschange — the symbols were renamed upstream).Dockerfile: bumpMOBILITYDB_COMMITto2c4243aso the WASM build matches the regeneratedbindings.c.Verify